@model AlphaWebsite.Models.UserWeddingPlan

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.CreatedBy)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.CreatedBy)
    @Html.ValidationMessageFor(model => model.CreatedBy)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Created)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Created)
    @Html.ValidationMessageFor(model => model.Created)
</div>

<div class="editor-label">
    User
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.UserID, ((IEnumerable<AlphaWebsite.Models.User>)ViewBag.PossibleUsers).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.UserID.ToString(),
        Selected = (Model != null) && (option.UserID == Model.UserID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.UserID)
</div>
